package com.zheng.business.rpc.mapper;



import com.zheng.business.dao.use.model.StatisticsModel;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author lvg EMIAL：<a href="mailto:weiguo.liang@gh-ca.com">weiguo.liang@gh-ca.com</a> <br>
 * @version 1.0 <br>
 * @Company: GH-CA<br>
 * @ClassName: BusinessApiMapper <br>
 * @Description: TODO <br>
 * @date 2019/3/17 12:52<br>
 **/
public interface BusinessApiMapper {

    /**
     *    某个时间段 代理雨伞订单金额总数量
     * @param beginTime
     * @param endTime
     * @return
     */
    List<Map<String,Object>> getAgentOrderAmountByTimeSlot(Date beginTime, Date endTime);

    /**
     *   某个时间段 设备雨伞订单金额总数量
     * @param beginTime
     * @param endTime
     * @return
     */
    List<Map<String,Object>> getMachineOrderAmountByTimeSlot(Date beginTime, Date endTime);

    /**
     *    某个时间段 代理时长卡订单金额总数量
     * @param beginTime
     * @param endTime
     * @return
     */
    List<Map<String,Object>> getAgentTimecardAmountByTimeSlot(Date beginTime, Date endTime);

    /**
     * 某个时间段 代理雨伞订单成功总数量
     * @param beginTime
     * @param endTime
     * @return
     */
    List<Map<String,Object>> getAgentOrderSuccessTotalByTimeSlot(Date beginTime, Date endTime);

    /**
     *    某个时间段 设备雨伞订单成功总数量
     * @param beginTime
     * @param endTime
     * @return
     */
    List<Map<String,Object>> getMachineOrderSuccessTotalByTimeSlot(Date beginTime, Date endTime);

    /**
     * 某个时间段 代理雨伞订单失败总数量
     * @param beginTime
     * @param endTime
     * @return
     */
    List<Map<String,Object>> getAgentOrderFailTotalByTimeSlot(Date beginTime, Date endTime);

    /**
     *    某个时间段 设备雨伞订单失败总数量
     * @param beginTime
     * @param endTime
     * @return
     */
    List<Map<String,Object>> getMachineOrderFailTotalByTimeSlot(Date beginTime, Date endTime);

    /**
     * 根据代理ID集合获取代理账单统计数据集合
     * @param agentIdList
     * @return
     */
    List<Map<String,Object>> getBillStatisticsList(List<Integer> agentIdList);

    /**
     * 复制雨伞订单到历史表进行账单生成统计
     * @param beginTime
     * @param endTime
     * @param createMonth
     * @return
     */
    int copyUmbrellaOrder2HistroyByTimeSlot(Date beginTime, Date endTime,String createMonth);

    /**
     * 复制时长卡订单到历史表进行账单生成统计
     * @param beginTime
     * @param endTime
     * @param createMonth
     * @return
     */
    int copyTimecard2HistroyByTimeSlot(Date beginTime, Date endTime,String createMonth);

    /**
     * 获取代理雨伞订单月账单统计数据
     * @param createMonth
     * @return
     */
    List<Map<String,Object>> getAgentUmbrellaOrderBillAmountByTime(String createMonth);
    /**
     * 获取代理时长卡月账单统计数据
     * @param createMonth
     * @return
     */
    List<Map<String,Object>> getAgentTimecardOrderBillAmountByTime(String createMonth);

    List<StatisticsModel> getOrderTrendByAgentId(StatisticsModel model);

    Double getProfitByAgentId(StatisticsModel model);

    Long getOrderCountByAgentId(StatisticsModel model);

    Long getFansByAgentId(StatisticsModel model);

    Double getDepositByAgentId(StatisticsModel model);

    Double getTimecardByAgentId(StatisticsModel model);

    Double getBalanceByAgentId(StatisticsModel model);

    List<StatisticsModel> getUmbrellaStatisticsByAgentId(StatisticsModel model);

    List<StatisticsModel> getMachineStatisticsByAgentId(StatisticsModel model);
}
